/*
 * Temperature.java
 * iRoomMonitor1.0
 * 11/13/10
 */

package RoomNanny.SpotSensors;

import com.sun.spot.sensorboard.EDemoBoard;
import com.sun.spot.sensorboard.peripheral.ITemperatureInput;
import java.io.*;

/**
 * This class initializes the temperature sensor on a SunSpot and collects
 * the temp in fahrenheit.
 *
 * @author Erin Griffiths
 */
public class Temperature {
    
    private ITemperatureInput tempSensor = EDemoBoard.getInstance()
            .getADCTemperature();
    /**
     * This method returns the current temp in fahrenheit.
     *
     * @return double temperature in fahrenheit
     * @throws IOException
     */
    public double getCurrent() throws IOException{
        return tempSensor.getFahrenheit();
    }

}
